#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int fac(int n)
{
	if (n == 0)
		return 1;
	else
	{
		int s = fac(n - 1) * n;
		printf("%d\n",s);
		return s;
	}
}
int main()
{
	int n = 0;
	scanf("%d\n", &n);
	int ret = fac(n);
	printf("%d", ret);
	return 0;
}